﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchCandidates.aspx.cs" Inherits="OVS.SearchCandidates" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <link href="~/OVS.css" rel="stylesheet" type="text/css" />
    <link href="~/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <div>
        <center>
            <asp:Label ID="lblMsg" runat="server" CssClass="message"></asp:Label>
            <asp:Label ID="lblErrMsg" runat="server" CssClass="error"></asp:Label>
            <asp:ValidationSummary ID="vsmErrors" runat="server" CssClass="summarymessage" Style="text-align: left;
                width: 20%" />
                
                  <div>
                    <asp:Label ID="Label2" runat="server" CssClass="ParaTitle">Search Candidate </asp:Label>
                    </div>
                    
            <table cellpadding="2" cellspacing="2">
                <tr>
                    <td colspan="2">
                        <OVSControl:SelectWard ID="SelectWard" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <hr />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" CssClass="label">Name </asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtname" CssClass="textfield" runat="server"></asp:TextBox>
                    </td>
                </tr>
                 <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" CssClass="label">Voter Id </asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox1" CssClass="textfield" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" runat="server" CssClass="label">Party</asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtParty" CssClass="textfield" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label8" runat="server" CssClass="label">Election</asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="ElectionId" CssClass="textfield" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button CausesValidation="false" CssClass="button" ID="btnSearch" value="Search"
                            Text="Search" runat="server" OnClick="btnSearch_Click"></asp:Button>
                        <asp:Button CausesValidation="false" CssClass="button" ID="btnReset" value="Reset"
                            Text="Reset" runat="server"></asp:Button>
                    </td>
                </tr>
            </table>
            <div id="divResult" style="margin: 0px 10px 10px 10px;">
                <div runat="server" id="divControls">
                    <OVSControl:SectionHeaderPlain ID="SearchRes" runat="server" SectionTitle="Search Results" />
                    <div id="divGrid" style="border: solid 1px silver; height: 350px; text-align: center;
                        overflow-x: hidden; overflow-y: auto;">
                        <asp:GridView   ID="gvResults" AutoGenerateColumns="true" BorderColor="Black" runat="server"
                            AllowPaging="true" AllowSorting="true" OnRowCommand="gvResults_OnRowCommand">
                            <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                            <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                                BorderStyle="None" />
                            <Columns>
                                <asp:TemplateField HeaderStyle-Width="5%" ItemStyle-Width="5%" ItemStyle-BorderStyle="None"
                                    HeaderStyle-BorderStyle="None">
                                    <ItemTemplate>
                                        <asp:Button CausesValidation="false" CommandName="EditCandidate" runat="server" ID="btnEdit" Text="Edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "CandidateId") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </center>
    </div>
    </div>
    </form>
</body>
</html>
